<table>
    <tr>
        <td style="vertical-align: top">

        </td>
    </tr>
</table>
<script>
    $(function() {
        $("#tabs").tabs();
    });
</script>

<style>
    .ui-tabs .ui-tabs-nav li a {
        float: left;
        padding: 0.5em 0.5em;
        text-decoration: none;
    }
</style>


<div style="margin-left: 7px; width: 100%">

    <div class="bgtopic340">
        <div class="topic_title">
            Thông tin
        </div>
    </div>
    <div style="width: 630px; padding-bottom: 10px; margin-top: 10px">

        <?php
        if ($model != null) {
            foreach ($model as $item) {
                if ($item->addfile > 0) {
                    ?>
                    <div style="float: right; width: 100px; ">


                        <a href="<?php echo Yii::app()->request->baseUrl . '/upload/tailieu/' . $item->fileaddname; ?>">
                            <div style="float: left;margin-right: 5px">
                                <img src="<?php echo Yii::app()->request->baseUrl . '/icon/save.png'; ?>" width="16">
                            </div><div>
                                Tải văn bản</div>
                        </a>


                    </div>
                    <?php }
                ?>

                <table style="border: 0px">
                    <tr>
                        <td style=" width: 163px; height: 70px">
                            <img src="<?php echo Yii::app()->request->baseUrl . '/upload/image/' . $item->hinh; ?>" width="100" height="100" title="<?php echo $item->title; ?>">
                        </td>
                        <td>
                            <?php
                            echo '<b>' . $item->title . '</b><br/>';

                            if (!empty($item->diachi)) {
                                echo 'Địa chỉ: ' . $item->diachi . '<br/>';
                            }
                            if (!empty($item->email)) {
                                echo 'Email: ' . $item->email . '<br/>';
                            }
                            if (!empty($item->phone)) {
                                echo 'Điện thoại: ' . $item->phone . '<br/>';
                            }
                            if (!empty($item->fax)) {
                                echo 'Fax: ' . $item->fax . '<br/>';
                            }

                            if (!empty($item->website)) {
                                echo 'Website: ' . $item->website;
                            }
                            ?>

                        </td>
                    </tr>
                </table>
                <div style="margin-top: 10px">
                    <div style="float: left; margin-right: 20px">

                        <div class="fb-like" data-href="<?php echo 'http://luatsukhongbiengioi.org/trung-tam-to-chuc/'.$item->id.'/' . $item->url; ?>" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>
                    </div>
                    <div style="float: left; margin-right: 20px">
                        <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
                        <g:plusone size="medium"></g:plusone>

                    </div>
                    <div >
                        <a href="https://twitter.com/share" class="twitter-share-button" data-lang="vn" data-url="<?php echo 'http://luatsukhongbiengioi.org/trung-tam-to-chuc/'.$item->id.'/' . $item->url; ?>">Tweet</a>
                        <script>!function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (!d.getElementById(id)) {
        js = d.createElement(s);
        js.id = id;
        js.src = "https://platform.twitter.com/widgets.js";
        fjs.parentNode.insertBefore(js, fjs);
        }
        }(document, "script", "twitter-wjs");</script>
                    </div>
                </div>
                <div id="tabs" style="margin-top: 10px">
                    <ul>
                        <?php 
                            $l = Configinfo::model()->findAll('id=1');
                            foreach ($l as $l1){
                                
                            
                        ?>
                        <li><a href="#tabs-1"><?php echo $l1->h1;?></a></li>

                        <li><a href="#tabs-2"><?php echo $l1->h2;?></a></li>
                        <li><a href="#tabs-3"><?php echo $l1->h3;?></a></li>
                        <li><a href="#tabs-4"><?php echo $l1->h4;?></a></li>
                        <li><a href="#tabs-5"><?php echo $l1->h5;?></a></li>
                            <?php }?>
                    </ul>
                    <div id="tabs-1">
                        <p><?php echo $item->gioithieu; ?></p>
                    </div>

                    <div id="tabs-2">
                        <p><?php echo $item->sanpham; ?></p>
                    </div>
                    <div id="tabs-3">
                        <p><?php echo $item->tinquangcao; ?></p>
                    </div>
                    <div id="tabs-4">
                        <p><?php echo $item->chungnhan; ?></p>
                    </div>

                    <div id="tabs-5">
                        <p><?php echo $item->tuyendung; ?></p>
                    </div>
                </div>
                <p><b>Bản Đồ</b><br/>
                    <?php echo $item->nhanhieu; ?>
                </p>
                <?php
            }
            // echo $model->content;
        } else {
            echo '<div style="color:red;font-weight: bold;font-size: 15pt;">Không tìm thấy trang bạn tìm</div>';
        }
        ?>

    </div>
</div>
</div>
</div>

<div style="clear: both"></div>
</div>
